﻿<div ng-init="init()" style="height:100%;">
    <form name="sheetForm" class="form-horizontal" role="form" onsubmit="return false;" style="height:100%;">
        <div class="form-group" style="vertical-align:middle;">
            <label for="price" class="col-sm-2 control-label">名称</label>
            <div class="col-sm-10">
                <input name="name" ng-model="sheet.name" class="form-control" id="name" type="text" size="60" maxlength="100" placeholder="资产清单简要描述" required>
            </div>
        </div>
        <div class="form-group" style="vertical-align:middle;">
            <label for="planningDeliveryTime" class="col-sm-2 control-label">计划交割时间</label>
            <div class="col-sm-4">
                <input type="date" name="planningDeliveryTime" ng-model="sheet.planningDeliveryTime" class="form-control" id="planningDeliveryTime" placeholder="计划交割时间" required>
            </div>
            <div role="alert">
                <span class="error" ng-show="sheetForm.planningDeliveryTime.$error.required">
                    必填
                </span>
                <span class="error" ng-show="sheetForm.planningDeliveryTime.$error.date">
                    日期格式不对, 正确格式为yyyy-mm-dd
                </span>
            </div>

        </div>
        <div class="form-group" style="vertical-align:middle;">
            <label for="planningDeliveryAddress" class="col-sm-2 control-label">计划交割地址</label>
            <div class="col-sm-10">
                <input name="planningDeliveryAddress" ng-model="sheet.planningDeliveryAddress" class="form-control" id="planningDeliveryAddress" type="text" size="60" maxlength="100" placeholder="计划交割地址" required>
            </div>
        </div>
        <div class="form-group" style="vertical-align:middle;">
            <label class="col-sm-2 control-label">付款方式</label>
            <div class="col-sm-10">
                <label ng-repeat="(key, value) in payMethods">
                    <input type="radio" name="payMethod" ng-model="sheet.payMethod" value="{{key}}">
                    {{value}}
                </label>
            </div>
        </div>
        <div class="form-group" style="vertical-align:middle;">
            <label for="dealRule" class="col-sm-2 control-label">成交规则</label>
            <div class="col-sm-10">
                <label ng-repeat="(key, value) in dealRules">
                    <input type="radio" name="dealRule" ng-model="sheet.dealRule" value="{{key}}">
                    {{value}}
                </label>
            </div>
        </div>
        <div class="form-group" style="vertical-align:middle;">
            <label for="requireCertificate" class="col-sm-2 control-label">要求从业资格证书</label>
            <div class="col-sm-10">
                <input type="checkbox" id="requireCertificate" ng-model="sheet.requireCertificate" />
            </div>
        </div>
        <div class="form-group" style="vertical-align:middle;">
            <label for="needDataCleanup" class="col-sm-2 control-label">需要数据销毁服务</label>
            <div class="col-sm-10">
                <input type="checkbox" id="needDataCleanup" ng-model="sheet.needDataCleanup" />
                说明：数据销毁服务由平台提供，收费标准说明
            </div>
            <div class="col-sm-10" ng-show="sheet.needDataCleanup == true">
                <p ng-repeat="(key, value) in cleanUpMethods">
                    <input type="radio" name="cleanUpMethod" ng-model="sheet.cleanUpMethod" value="{{key}}">
                    {{value}}
                </p>
             </div>
        </div>
        <!--<div class="form-group" style="vertical-align:middle;">
            <label for="calculatedTotalPrice" class="col-sm-2 control-label">总价格(基于明细汇总)</label>
            <div class="col-sm-10">
                {{sheet.totalPrice}}
            </div>
        </div>-->
        <div ag-grid="gridOptions" class="ag-fresh" style="height: 50%;"></div>
        <br />
        <div class="form-group pull-right" style="padding-right:15px;">
            <button class="btn btn-primary" ng-disabled="sheetForm.$invalid" ng-click="save(1)">保存为草稿</button>
            <button class="btn btn-primary" ng-disabled="sheetForm.$invalid" ng-click="save(2)">保存并提交审核</button>
        </div>
    </form>

</div>